{% extends 'layout.html.twig' %}

{% set lang = app.request.getLocale() %}

{% if lang == 'en' %}
  {% do script(['libs/vue.js','libs/item-bank/lib/itemBank.umd.min.js', 'libs/item-bank/lib/locale/en-US.js', 'app/js/assessment/show/index.js']) %}
{% else %}
  {% do script(['libs/vue.js','libs/item-bank/lib/itemBank.umd.min.js','app/js/assessment/show/index.js']) %}
{% endif %}

{% block title %}{{ assessment.name }} - {{ parent() }}{% endblock %}

{% block stylesheets %}
  {{ parent() }}
  {% if maincolor != 'default' and setting('theme.code', 'jianmo') == 'jianmo' %}
    <link href="{{ asset('static-dist/libs/item-bank/lib/styles/item-bank-' ~ maincolor ~ '.css') }}" rel="stylesheet" />
  {% else %}
    <link href="{{ asset('static-dist/libs/item-bank/lib/styles/item-bank.css') }}" rel="stylesheet" />
  {% endif %}
{% endblock %}


{% block body %}
    {% block header %}
        {% if showHeader|default(0) %}{{ parent() }}{% endif %}
    {% endblock %}

    {% include 'testpaper-copy-style.html.twig' %}
    <div id="app" style="min-height:500px"></div>
    <input type="hidden" name="assessment" value='{{ assessment|json_encode }}'>
    <input type="hidden" name="ckeditor_path" value="{{ asset('static-dist/libs/es-ckeditor/ckeditor.js') }}">
    <input type="hidden" name="jquery_path" value="{{ asset('static-dist/libs/jquery/dist/jquery.min.js') }}">
    <input type="hidden" name="ckeditor_image_upload_url" value="{{ path('editor_upload', {token:upload_token('course')}) }}">
    <input type="hidden" name="ckeditor_image_download_url" value="{{ path('editor_download', {token:upload_token('course')}) }}">
    {% include 'attachment-upload/upload-data.html.twig'  %}

    {% block footer %}
        {% if showHeader|default(0) %}{{ parent() }}{% endif %}
    {% endblock %}
{% endblock %}